<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">

    <title>爱钱帮_申请借款</title>

    <!--[if lt IE 9]>
    <script src="/statics/statics/newcommon/js/html5shiv.js"></script>
    <![endif]-->
    <link rel="Shortcut  Icon" href="/statics/statics/home/images/minilogo.png">
    <link rel="stylesheet" href="/statics/statics/newcommon/css/m2-commonNew.css?20160520">
    <link rel="stylesheet" href="/statics/statics/home2/css/m2-main.css?20160520">
    <link rel="stylesheet" href="/statics/statics/newcommon/css/m2-common.css?20160520">
    <script type="text/javascript" src="/statics/statics/home/js/jquery.min.js"></script>
    <script type="text/javascript" src="/statics/statics/newcommon/js/common.js?20160520"></script>

    <link rel="stylesheet" href="/statics/statics/home2/css/login.css">
    <link rel="stylesheet" href="/statics/statics/home2/css/userCenter.css">
    <link rel="stylesheet" href="/statics/statics/home2/css/m2-main.css?20160520">
</head>

    <div class="m2-regist-main">
        <div class="m2-regist-center">
            <div class="m2-regist-logo" style="height:46px">
                <a href='#'><img src="/statics/statics/home2/images/new-logo.png"></a>
            </div>
            <div class="m2-regist-left" style="margin-top: 20px">
                <ul>
                    <li><i></i>申贷基础信息</li>
                    <li><i class="m2-regist-step"></i>申贷详细信息</li>
                </ul>
                <div class="m2-regist-inputarea">
                    <h4 ><b>填写抵押品详细信息</b>项目编号：<a href="javascript:void(0);" >${project.proCode}</a></h4>
                    <form id="add_detail" name="add_detail" method="post" action="/loan_project/addDetail" enctype="multipart/form-data">
                        <table cellpadding="0" cellspacing="0" border="0">
                            <!--<tr>-->
                            <!--<td><i class="m2-regist-mobicon"></i>手机号</td>-->
                            <!--<td class="m2-regist-tdInput"><input type="text" maxlength="11" class="m2-regist-username" maxlength="11" placeholder="请输入常用手机号" id="phone" /><span class="m2-regist-errMsg"></span></td>-->
                            <!--</tr>-->
                            <tr>
                                <td>项目名称</td>
                                <td class="m2-regist-tdInput"><input name="proName" type="text" value="${project.proName}" readonly="readonly" class="m2-regist-username" maxlength="50" /><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <input type="hidden" name="pjId" value="${project.proId}"/>
                            <input type="hidden" name="proCode" value="${project.proCode}"/>
                            <input type="hidden" name="loanAmount" value="${project.proAmount}"/>
                            <tr>
                                <td>实物状况</td>
                                <td class="m2-regist-tdInput"><input id="pawnStatus" name="pawnStatus" type="text" value="" class="m2-regist-username" maxlength="200" onblur="javascript:verifyForm1()"/><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <tr>
                                <td>证件状况</td>
                                <td class="m2-regist-tdInput" ><input id="certificateStatus" name="certificateStatus" type="text" value="" class="m2-regist-username" maxlength="50" onblur="javascript:verifyForm2()"/><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <tr>
                                <td>整体照片</td>
                                <td class="m2-regist-tdInput" ><input id="logo_pic" name="pics" type="file" class="m2-regist-username" onblur="javascript:verifyForm3()"/><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <tr>
                                <td>细节照片1</td>
                                <td class="m2-regist-tdInput" ><input name="pics" type="file" class="m2-regist-username" /><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <tr>
                                <td>细节照片2</td>
                                <td class="m2-regist-tdInput" ><input name="pics" type="file" class="m2-regist-username" /><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <tr>
                                <td>细节照片3</td>
                                <td class="m2-regist-tdInput" ><input name="pics" type="file" class="m2-regist-username" /><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <tr>
                                <td>细节照片4</td>
                                <td class="m2-regist-tdInput" ><input name="pics" type="file" class="m2-regist-username" /><span class="m2-regist-errMsg"></span></td>
                            </tr>
                            <tr>
                                <td>细节照片5</td>
                                <td class="m2-regist-tdInput" ><input name="pics" type="file" class="m2-regist-username" /><span class="m2-regist-errMsg"></span></td>
                            </tr>

                        </table>
                        <div class="m2-regist-btn">
                            <%--<input type="checkbox" checked="checked" id="service"/>我同意<b>《爱钱帮借款协议》</b>--%>
                            <a href="javascript:add_detail(document.getElementById('add_detail'))">提交申请</a>
                        </div>
                    </form>

                </div>
                <p>为了您的数据安全，我们采用了SSL传输方式，256位SGC加密保护!</p>
            </div>
            <div class="m2-login-right">
                <h2>申请快提现快</h2>
                <img style="visibility: hidden" src="/statics/statics/home2/images/exper_v2.png"/>
                <p>首次体验，<br/>了解更多细节请进<a href="guide.html" target="_blank">新手引导>></a></p>
            </div>
        </div>
    </div>

    </body>
    <script type="text/javascript">

        var flag=true;
        // 表单验证
        function verifyForm1(){
            flag=true;
            var pawnStatus = $('#pawnStatus').val();
            if (pawnStatus=='') {
                flag=false;
                $('#pawnStatus').next().html("必须输入实物状况信息").show();
            }else{
                $('#pawnStatus').next().hide();
            }

        }
        function verifyForm2(){
            flag=true;
            var certificateStatus = $('#certificateStatus').val();
            if (certificateStatus=='') {
                flag=false;
                $('#certificateStatus').next().html("必须输入证件状况信息").show();
            }else{
                $('#certificateStatus').next().hide();
            }
        }
        function verifyForm3(){
            flag=true;
            var logo_pic = $('#logo_pic').val();
            if (logo_pic=='') {
                flag=false;
                $('#logo_pic').next().html("必须上传整体实物照片").show();
            }else{
                $('#logo_pic').next().hide();
            }
        }
        function add_detail(form) {
            if ($('#pawnStatus').val()==''){
                flag=false;
            }
            if ($('#certificateStatus').val()==''){
                flag=false;
            }
            if ($('#logo_pic').val()==''){
                flag=false;
            }
            if (flag){
                form.submit();
            } else {
                alert("请完善表单信息！")
                return;
            }
        }
    </script>
</html>
